<?
/***
*    This file is part of Marketorama.
*
*    Marketorama is free software: you can redistribute it and/or modify
*    it under the terms of the GNU General Public License as published by
*    the Free Software Foundation, either version 3 of the License, or
*    (at your option) any later version.
*
*    Marketorama is distributed in the hope that it will be useful,
*    but WITHOUT ANY WARRANTY; without even the implied warranty of
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR *PURPOSE.  See the
*    GNU General Public License for more details.
*
*    You should have received a copy of the GNU General Public License
*    along with Marketorama.  If not, see <http://www.gnu.org/licenses/>.
***/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
    <head> 
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
        <title>Market-o-rama - <?=$title?></title> 
        <link rel='stylesheet' type='text/css' media='all' href='<?=base_url()?>css/marketorama.css' /> 
        <meta name='robots' content='all' /> 
        <meta name='author' content='Blind Bugs' /> 
        <meta name='description' content='Market-o-rama' /> 
    </head>
    <body>
    <div id="wrap"><!-- wrap starts here -->
        <div id="header">
            <h1 id="logo">Market<span>o</span>rama</h1> 
            <h2 id="slogan">Track your Apps and Markets...</h2>
            <div id="userinfo">
                <?
                    // Logged in
                    if ($this->session->userdata('is_logged_in')) 
                    {
                            echo ("Logged in ".$this->session->userdata('FirstName')." ".$this->session->userdata('LastName'));
                            echo ('. <a href="'.site_url('loginmanager/logout').'">Logout</a>');
                    }
                    else // Not Logged in
                    {
                        echo form_open('loginmanager/validateCredentials');
                        echo ('User:');
                        echo form_input('username');
                        echo ('Password:');
                        echo form_password('password');
                    
                        echo form_checkbox('autologin');
                        echo ('Remember me&nbsp;');
                        echo form_submit ('submit','Let\'s go!');
                        echo form_close();
                    }
                ?>
            </div>
        </div>
        <div id="menu">
            <ul>
                <?
                    // Login only section            
                    if ($this->session->userdata('is_logged_in')):
                ?>
					<li <?if($current=='MyDashboard') echo('id="current"'); ?>><a class="selectednav" href="<?=site_url('dashboard');?>">Home</a></li>            
					<!--<li <?if($current=='MyProjects') echo ('id="current"'); ?>><a href="<?=site_url('projects');?>">My Projects</a></li>-->
                    <li <?if($current=='MyApps') echo('id="current"'); ?> ><a href="<?=site_url('myapps');?>">My Apps</a></li>
                    <li <?if($current=='MyProfile') echo('id="current"'); ?>><a href="<?=site_url('profile');?>">My Profile</a></li>
                <? else: ?>
					<li <?if($current=='Home') echo('id="current"'); ?>><a class="selectednav" href="<?=site_url('home');?>">Home</a></li>            
                
                <?
                    endif 
                    // End Login only section 
                ?>
				<li <?if($current=='Markets') echo('id="current"'); ?>><a class="selectednav" href="<?=site_url('markets');?>">Markets</a></li>

            </ul>
        </div>
    

